// const util = require("../utils/connection");
// const Table = require("../utils/table");
// const TableUtil = new Table("article", ["id", "a_id", "t_id"]);

module.exports = {
  selectByArticleId: function() {
    return new Promise(async resolve => {
      // const sql =
      //   "select id, uid, title, content, outline, cover, state, create_time, update_time from article where id = ?";
      // const connection = await util.getConnection();
      // connection.query(sql, [id], async function(error, results) {
      //   connection.release();
      //   if (error) throw error;
      //   const article = results[0];
      //   if (results[0]) {
      //     const u = await userService.getUserById(results[0].uid);
      //     article["author"] = u.data.username;
      //   }
      //   resolve({ data: article || {} });
      // });
    });
  }
};
